package com.ruoyi.service.masterdate.impl;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.mapper.jpjs.person.PersonMapper;
import com.ruoyi.mapper.masterdate.PostMapper;
import com.ruoyi.service.jpjs.person.PersonService;
import com.ruoyi.service.masterdate.PostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
@DataSource(value = DataSourceType.SLAVE)
public class PostServiceImpl implements PostService {
    @Autowired
    private PostMapper postMapper;

    @Override
    public List<Map<String, Object>> findPostAll(Map<String, Object> map) {
        return postMapper.findPostAll(map);
    }

    @Override
    public Map<String, Object> findPost(String id) {
        return postMapper.findPost(id);
    }

    @Override
    public int addPost(Map<String, Object> map) {
        return postMapper.addPost(map);
    }

    @Override
    public int editPost(Map<String, Object> map) {
        return postMapper.editPost(map);
    }
    
}
